package io.github.talelin.latticy.mapper;

import io.github.talelin.latticy.common.mybatis.Page;
import io.github.talelin.latticy.model.ChargePlanDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.github.talelin.latticy.vo.ChargePlanPageVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 计费方案 Mapper 接口
 * </p>
 *
 * @author generator@wulongbo
 * @since 2022-08-23
 */
public interface ChargePlanMapper extends BaseMapper<ChargePlanDO> {

    boolean deleteById(@Param("id")Integer id);

    int getOneToManyBeforeByPage(@Param("start")Integer start, @Param("count")Integer count);

    int getTotalByPlanName(@Param("name") String name);

    List<ChargePlanPageVO> getChargePlanPage(@Param("start")Integer start, @Param("count")Integer count, @Param("name") String name);

}
